PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor(String,Int32,String,String,String[])
Example 




Proxy hostname
Proxy port
Username for basic authentication (null if no authentication is needed)
Password for basic authentication (null if no authentication is needed)
Additional request header lines to be sent to the server
Connection data for an HTTP proxy.
Syntax
'Declaration
 
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer, _
   ByVal username As String, _
   ByVal password As String, _
   ByVal requestHeaderLines() As String _
)
'Usage
 
Dim hostNameOrAddress As String
Dim port As Integer
Dim username As String
Dim password As String
Dim requestHeaderLines() As String
 
Dim instance As New HttpProxyData(hostNameOrAddress, port, username, password, requestHeaderLines)
public HttpProxyData( 
   string hostNameOrAddress,
   int port,
   string username,
   string password,
   string[] requestHeaderLines
)
public: HttpProxyData( 
   string* hostNameOrAddress,
   int port,
   string* username,
   string* password,
   string*[]* requestHeaderLines
)
public:
HttpProxyData( 
   String^ hostNameOrAddress,
   int port,
   String^ username,
   String^ password,
   array<String^>^ requestHeaderLines
)

Parameters

hostNameOrAddress
Proxy hostname
port
Proxy port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)
requestHeaderLines
Additional request header lines to be sent to the server
Remarks

It is possible to specify a username and password if the proxy requires basic authentication. Also, additional request header lines can be specified (e.g., "User-Agent: CERN-LineMode/2.15 libwww/2.17b3").

Neither username nor password can be null to use basic authentication.

Example
new HttpProxyData("192.168.1.1", "3128", "proxyuser", "secret", new String[]
{"User-Agent: TrileadDerivedClient/1.0", "X-My-Proxy-Option: something"});
See Also

Reference

HttpProxyData Class
HttpProxyData Members
Overload List


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic